package com.vf.admin.client.service.impl;

import com.vf.admin.client.dao.ExpressionsUserCustomDao;
import com.vf.admin.client.service.ExpressionsUserCustomService;
import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.entity.ExpressionsUserCustom;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ExpressionsUserCustomServiceImpl implements ExpressionsUserCustomService {

    @Autowired
    private ExpressionsUserCustomDao expressionsUserCustomDao;

    @Override
    public void saveOrUpdate(ExpressionsUserCustom param) {
        if (param.getId() != null && param.getId() > 0) {
            expressionsUserCustomDao.update(param);
        } else {
            expressionsUserCustomDao.add(param);
        }
    }

    @Override
    public List<ExpressionsUserCustom> page(SplitPageBean page, Map<String, Object> paraMap) {
        return expressionsUserCustomDao.page(page, paraMap);
    }

    @Override
    public List<ExpressionsUserCustom> list(Integer userId) {
        List<ExpressionsUserCustom> list = expressionsUserCustomDao.list(userId);
        return list;
    }

    @Override
    public void del(Integer userId, Integer id) {
        expressionsUserCustomDao.del(userId, id);
    }

}
